package net.stogi.common.gwt.dispatch.shared.exception;

import net.stogi.common.gwt.dispatch.shared.core.Action;
import net.stogi.common.gwt.dispatch.shared.core.Result;

public class UnsupportedActionException extends ActionException {

	private static final long serialVersionUID = 9107649339691471939L;

	@SuppressWarnings("unchecked")
	public UnsupportedActionException(Action<? extends Result> action) {
		this((Class<? extends Action<? extends Result>>) action.getClass());
	}

	public UnsupportedActionException(Class<? extends Action<? extends Result>> clazz) {
		super("No handler is registered for " + clazz.getName());
	}

	protected UnsupportedActionException() {}
}
